import urllib.request

# urlretrieve(url, filename) url:

# 下载网页
url_page = 'http://www.baidu.com'
urllib.request.urlretrieve(url_page, 'baidu.html')

# 下载图片
url_img = "https://www.bing.com/images/search?view=detailV2&ccid=zHW61ZeJ&id=A78C2B354BEA17F1468E0363F7E495FEB27352E2&thid=OIP.zHW61ZeJYKL1FY5mzsZHVwHaEK&mediaurl=https%3a%2f%2fwww.feuga.es%2fwp-content%2fuploads%2f2023%2f01%2fpython-curso-1024x576.jpg&exph=576&expw=1024&q=python&simid=608003504106913447&FORM=IRPRST&ck=7BFF342035EA58FF85093CA1AD86BD76&selectedIndex=36&itb=0"
urllib.request.urlretrieve(url=url_img, filename='baidu.jpg')

# 下载视频
url_video = "https://tv.sohu.com/v/dXMvMzM1OTQxNzk3LzM5OTA4NDE3Ni5zaHRtbA==.html"
urllib.request.urlretrieve(url=url_video, filename='baidu.mp4')
